﻿@model IEnumerable<GameSchoolWeb.Models.TurninInAssignment>
<div id="templatemo_content">
    @{
        ViewBag.Title = "Öll verkefni sem hefur verið skilað inn";
    }
    <div class="templatemo_box">
        <h2>
            Öll verkefni sem hefur verið skilað inn</h2>
        <div class="body">
            <table>
                <tr>
                    <th>
                        Titill
                    </th>
                    <th>
                        Stig
                    </th>
                    <th>
                        Nemandi
                    </th>
                    <th>
                    </th>
                </tr>
                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.strTitle)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.nScore)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.aspnet_User.UserName)
                        </td>
                        @if (HttpContext.Current.User.IsInRole("Kennari"))
                        {     
                            <td>
                                @Html.ActionLink("Fara yfir", "PostStudentScore", new { item.assignmentId, item.UserId })
                            </td>
                        }
                    </tr> 
                }
            </table>
        </div>
        <div class="box_bottom">
            <span></span>
        </div>
    </div>
</div>
